core: Fix possible crash in ostree_mutable_tree_walk()
authorSam Thursfield <ssssam@gmail.com>
Tue, 31 Mar 2015 16:59:43 +0000 (12:59 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Tue, 31 Mar 2015 17:04:31 +0000 (13:04 -0400)
commitd667ebe1568591bdd3c3cc23d751ffc5c0a3752c
tree91ba74b876f379eee5916272d8feee12c2a9c728
parent3ffc277bed6a0aff289ff0acb61e08ae7b6e33ef
core: Fix possible crash in ostree_mutable_tree_walk()

If the starting index is beyond the end of the list, it's a programming
error. Previously, the code was trying to raise a runtime error, but
actually causing a segfault.

This was detected by test code in test-mutable-tree.c, which is removed
in this commit because it should now not be possible to crash here.

https://bugzilla.gnome.org/747032
src/libostree/ostree-mutable-tree.c
tests/test-mutable-tree.c